﻿/**
 * 
 * @file   FITKAcousticsHDF5AttributeObject.h
 * @brief  HDF5属性对象
 * @author TanDongYang (tandongyang@diso.cn)
 * @date   2024-11-21
 * 
 */
#ifndef FITKACOUSTICSHDF5ATTRIBUTEOBJECT_H
#define FITKACOUSTICSHDF5ATTRIBUTEOBJECT_H

#include "FITKAcousticsPostDataAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"

namespace Acoustics
{
    /**
     * @brief   HDF5属性对象
     * @author  TanDongYang (tandongyang@diso.cn)
     * @date    2024-11-21
     */
    class FITKAcousticsPostDataAPI FITKAcousticsHDF5AttributeObject :
        public Core::FITKAbstractNDataObject
    {
        FITKCLASS(Acoustics, FITKAcousticsHDF5AttributeObject);
    public:

        /**
         * @brief   属性类型枚举
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        enum AttributeType
        {
            Type_32bit_Floating_Point,
            Type_32bit_Bit_Interger,
        };

        /**
         * @brief   Construct a new FITKAcousticsHDF5AttributeObject object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        explicit FITKAcousticsHDF5AttributeObject() = default;

        /**
         * @brief   Destroy the FITKAcousticsHDF5AttributeObject object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        virtual ~FITKAcousticsHDF5AttributeObject() = default;


        /**
         * @brief   获取参数类型
         * @return  类型枚举
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        FITKAcousticsHDF5AttributeObject::AttributeType getType() const { return _type; }

        /**
         * @brief   设置类型
         * @param[i]   val
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        void setType(FITKAcousticsHDF5AttributeObject::AttributeType val) { _type = val; }

        /**
         * @brief   获取数量
         * @return  数量值
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        int getArraySize() const { return _arraySize; }

        /**
         * @brief   设置数量
         * @param[i]   val  数量值
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        void setArraySize(int val) { _arraySize = val; }

        /**
         * @brief   获取列数据
         * @return  列数据对象
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        QList<QVariant> getValue() const { return _value; }

        /**
         * @brief   设置列数据
         * @param[i]   val  列数据对象
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        void setValue(QList<QVariant> val) { _value = val; }

    protected:
        /**
         * @brief   属性类型枚举
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        AttributeType _type{};

        /**
         * @brief   数据数量
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        int _arraySize{};

        /**
         * @brief   数据列
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21
         */
        QList<QVariant> _value{};

    };


    /**
     * @brief   HDF5属性管理类
     * @author  TanDongYang (tandongyang@diso.cn)
     * @date    2024-11-21 
     */
    class FITKAcousticsPostDataAPI FITKAcousticsHDF5AttributeManager : public Core::FITKAbstractNDataObject
        , public Core::FITKAbstractDataManager<FITKAcousticsHDF5AttributeObject>
    {
        FITKCLASS(Acoustics, FITKAcousticsHDF5AttributeManager);
    public:
        explicit FITKAcousticsHDF5AttributeManager() = default;
        virtual ~FITKAcousticsHDF5AttributeManager() = default;
    };
}
#endif // FITKACOUSTICSHDF5ATTRIBUTEOBJECT_H
